<?php

namespace App\VO\UserCoupon;

use App\VO\AListBaseVO;
use App\VO\UserCoupon\MetaInfo\CouponInfo;
use App\VO\UserCoupon\MetaInfo\UserCouponSearchInfo;

class UserCouponIndexVO extends AListBaseVO
{
    /**
     * @var UserCouponSearchInfo
     */
    public $search;

    /**
     * @var CouponInfo[]
     */
    public $coupons = [];

    /**
     * @param UserCouponSearchInfo $search
     */
    public function setSearch(UserCouponSearchInfo $search): void
    {
        $this->search = $search;
    }

    /**
     * @param CouponInfo $coupon
     */
    public function addCoupon(CouponInfo $coupon)
    {
        $this->coupons[] = $coupon;
        $this->count++;
    }
}
